<?php
/*
 * Created on Oct 3, 2008
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
 
 /* $data is the base class which contains the title
  *
  */
public static function render($outputType = null, $data) {
	
	if (!$outputType) {
		$outputType = self::getResponse('type', 'html');
	}
	
	switch($outputType) {
		case 'html':
			$display=new displayAsHTML($data.getTitle(), $data.getDate())
			$display->
			break;
			
		case 'atom':
			header('Content-type: text/xml;charset=utf-8');
			$defaultSkin = PANTS_DIR.'/themes/default/'.$pageName.'.atom.php';
			$skin        = PANTS_DIR.'/themes/'.PANTS_THEME.'/'.$pageName.'.atom.php';
			break;
			
		case 'rss':
			header('Content-type: text/xml;charset=utf-8');
			$defaultSkin = PANTS_DIR.'/themes/default/'.$pageName.'.rss.php';
			$skin        = PANTS_DIR.'/themes/'.PANTS_THEME.'/'.$pageName.'.rss.php';
			break;
	}
	
	if (file_exists($skin)) {
		require $skin;
	} else if (file_exists($defaultSkin)) {
		require $defaultSkin;
	} else {
		self::error404();
	}
	
	exit;
}
?>
